#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
int n,r[N];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",r+i);
    }
    sort(r+1,r+n+1);
    int cur=1;
    for(int i=2;i<=n;i++){
        if(r[i]>r[cur]){
            cur++;
        }
    }
    printf("%d\n",n-cur+1);
	return 0;
}
/*
things to check:
1. freopen
2. int / long long
3. array bounds
4. clear when multi-tests
5. MOD
g++ duel.cpp -o duel -Wall -Wextra -Wshadow -Wconversion
*/